home *** CD-ROM | disk | FTP | other *** search
- unit Unit1;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- uses ComObj;
-
- {$R *.DFM}
-
- procedure TForm1.Button1Click(Sender: TObject);
- var
- V1: OleVariant;
- I: Integer;
- T1: Cardinal;
- begin
- V1 := CreateOleObject('Word.Application');
- T1 := GetTickCount;
- for I := 1 to 1000 do
- V1.Caption := V1.Caption + 'x';
- Caption := IntToStr(GetTickCount - T1);
- V1.Visible := True;
- end;
-
- end.
-